import { ModuleConfig } from '../../../bootstrap/interface';
import { routes } from './routes';
import en_api from './i18n/en_api.json';
import ru_api from './i18n/ru_api.json';
import { handlers } from './mocks';
import { AuthService } from '../service/auth.service.ts';

export default {
  ROUTES: () => routes,

  I18N: (i18n) => {
    i18n.addResourceBundle('en', 'auth', en_api);
    i18n.addResourceBundle('ru', 'auth', ru_api);
  },
  mockHandlers: handlers,
  afterBootstrapInit: async (bootstrap) => {
    const authService = bootstrap.di.get<AuthService>(AuthService);
    await authService.initialize();
  },
} as ModuleConfig;
